package qa.tests;

import java.util.Comparator;

final class AssertlessOnTopComparator implements Comparator<Statistic> {
    public int compare(Statistic o1, Statistic o2) {
        int compare = Integer.valueOf(o1.numberOfAsserts())
                .compareTo(Integer.valueOf(o2.numberOfAsserts()));
        if (compare == 0) {
            return o1.getName().compareTo(o2.getName());
        }
        return compare;
    }
}